const userInfo = 'user'

export function getLocalInfo(str) {
  return localStorage.getItem(str)
}

export function setLocalInfo(str, data) {
  return localStorage.setItem(str, data)
}

export function removeLocalInfo(str) {
  return localStorage.removeItem(str)
}

export function getUser() {
  return localStorage.getItem(userInfo)
}

export function setUser(user) {
  return localStorage.setItem(userInfo, JSON.stringify(user))
}

export function removeUser() {
  return localStorage.removeItem(userInfo)
}
